package org.luckyjourney.entity.booking;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("orders")
@Builder
public class Orders implements Serializable {


    /**
     * 订单状态 1待付款 2已支付 3退款 4已关闭 5已完成 6已取消7退款中8已拒绝
     */
    public static final Integer PENDING_PAYMENT = 1;
    public static final Integer TO_BE_CONFIRMED = 2;
    public static final Integer CONFIRMED = 3;
    public static final Integer DELIVERY_IN_PROGRESS = 4;
    public static final Integer COMPLETED = 5;
    public static final Integer CANCELLED = 6;
    public static final Integer REFUND_REQUESTS = 7;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty("咨询师id")
    private Long userId;
    @ApiModelProperty("订单号")
    private String ordersNumber;
    @ApiModelProperty("用户id")
    private Long regularId;
    @ApiModelProperty("付款方式")
    private String paymentMethods;
    @ApiModelProperty("退款方式")
    private String refundMethods;
    @ApiModelProperty("订单状态")
    private Integer status;
    @ApiModelProperty("支付时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime paymentTime;
    @ApiModelProperty("退款时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime refundTime;
    @ApiModelProperty("预约日期")
    private String appointmentDate;
    @ApiModelProperty("预约时间")
    private String appointmentTime;
    @ApiModelProperty("快照")
    private String snapshot;
    @ApiModelProperty("预约id")
    private Long bookingId;
    //订单取消时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime cancelTime;
    @ApiModelProperty("完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime finishTime;
    //订单取消原因
    private String cancelReason;
    @ApiModelProperty("订单创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty("价格")
    private BigDecimal price;

    @ApiModelProperty("咨询类型id")
    private Long classifyId;
    @ApiModelProperty("退款的订单号")
    private String refundOrdersNumber;
    @ApiModelProperty("退款申请的时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private  LocalDateTime applicationTime;


    //退款申请的描述
    private  String requestDescription;
}
